﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Himp.Platform.Migrations
{
    /// <inheritdoc />
    public partial class modify_table_msg_send_rec : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "BIZ_NO",
                table: "MainMsgSendRec");

            migrationBuilder.RenameColumn(
                name: "MSG_STATS",
                table: "MainMsgSendRec",
                newName: "MsgStats");

            migrationBuilder.RenameColumn(
                name: "MSG_SEND_USERNAME",
                table: "MainMsgSendRec",
                newName: "MsgSendUsername");

            migrationBuilder.RenameColumn(
                name: "MSG_SEND_USERID",
                table: "MainMsgSendRec",
                newName: "MsgSendUserid");

            migrationBuilder.RenameColumn(
                name: "MSG_SEND_DEPTNAME",
                table: "MainMsgSendRec",
                newName: "MsgSendDeptname");

            migrationBuilder.RenameColumn(
                name: "MSG_SEND_DEPTID",
                table: "MainMsgSendRec",
                newName: "MsgSendDeptid");

            migrationBuilder.RenameColumn(
                name: "MSG_RECV_USERNAME",
                table: "MainMsgSendRec",
                newName: "MsgRecvUsername");

            migrationBuilder.RenameColumn(
                name: "MSG_RECV_USERID",
                table: "MainMsgSendRec",
                newName: "MsgRecvUserid");

            migrationBuilder.RenameColumn(
                name: "MSG_RECV_DEPTNAME",
                table: "MainMsgSendRec",
                newName: "MsgRecvDeptname");

            migrationBuilder.RenameColumn(
                name: "MSG_RECV_DEPTID",
                table: "MainMsgSendRec",
                newName: "MsgRecvDeptid");

            migrationBuilder.RenameColumn(
                name: "MSG_LV",
                table: "MainMsgSendRec",
                newName: "MsgLv");

            migrationBuilder.RenameColumn(
                name: "MSG_CONT",
                table: "MainMsgSendRec",
                newName: "MsgCont");

            migrationBuilder.RenameColumn(
                name: "MSG_RECV_USERNAME",
                table: "MainMsgReadRec",
                newName: "MsgRecvUsername");

            migrationBuilder.RenameColumn(
                name: "MSG_RECV_USERID",
                table: "MainMsgReadRec",
                newName: "MsgRecvUserid");

            migrationBuilder.RenameColumn(
                name: "MSG_RECV_TIME",
                table: "MainMsgReadRec",
                newName: "MsgRecvTime");

            migrationBuilder.RenameColumn(
                name: "SRTNO",
                table: "MainMsgBizType",
                newName: "Srtno");

            migrationBuilder.RenameColumn(
                name: "MSG_BIZ_TYPE_NAME",
                table: "MainMsgBizType",
                newName: "MsgBizTypeName");

            migrationBuilder.RenameColumn(
                name: "MSG_BIZ_TYPE_CODG",
                table: "MainMsgBizType",
                newName: "MsgBizTypeCodg");

            migrationBuilder.RenameColumn(
                name: "DEFAULT_FLAG",
                table: "MainMsgBizType",
                newName: "DefaultFlag");

            migrationBuilder.AddColumn<string>(
                name: "MsgName",
                table: "MainMsgSendRec",
                type: "text",
                nullable: false,
                defaultValue: "");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "MsgName",
                table: "MainMsgSendRec");

            migrationBuilder.RenameColumn(
                name: "MsgStats",
                table: "MainMsgSendRec",
                newName: "MSG_STATS");

            migrationBuilder.RenameColumn(
                name: "MsgSendUsername",
                table: "MainMsgSendRec",
                newName: "MSG_SEND_USERNAME");

            migrationBuilder.RenameColumn(
                name: "MsgSendUserid",
                table: "MainMsgSendRec",
                newName: "MSG_SEND_USERID");

            migrationBuilder.RenameColumn(
                name: "MsgSendDeptname",
                table: "MainMsgSendRec",
                newName: "MSG_SEND_DEPTNAME");

            migrationBuilder.RenameColumn(
                name: "MsgSendDeptid",
                table: "MainMsgSendRec",
                newName: "MSG_SEND_DEPTID");

            migrationBuilder.RenameColumn(
                name: "MsgRecvUsername",
                table: "MainMsgSendRec",
                newName: "MSG_RECV_USERNAME");

            migrationBuilder.RenameColumn(
                name: "MsgRecvUserid",
                table: "MainMsgSendRec",
                newName: "MSG_RECV_USERID");

            migrationBuilder.RenameColumn(
                name: "MsgRecvDeptname",
                table: "MainMsgSendRec",
                newName: "MSG_RECV_DEPTNAME");

            migrationBuilder.RenameColumn(
                name: "MsgRecvDeptid",
                table: "MainMsgSendRec",
                newName: "MSG_RECV_DEPTID");

            migrationBuilder.RenameColumn(
                name: "MsgLv",
                table: "MainMsgSendRec",
                newName: "MSG_LV");

            migrationBuilder.RenameColumn(
                name: "MsgCont",
                table: "MainMsgSendRec",
                newName: "MSG_CONT");

            migrationBuilder.RenameColumn(
                name: "MsgRecvUsername",
                table: "MainMsgReadRec",
                newName: "MSG_RECV_USERNAME");

            migrationBuilder.RenameColumn(
                name: "MsgRecvUserid",
                table: "MainMsgReadRec",
                newName: "MSG_RECV_USERID");

            migrationBuilder.RenameColumn(
                name: "MsgRecvTime",
                table: "MainMsgReadRec",
                newName: "MSG_RECV_TIME");

            migrationBuilder.RenameColumn(
                name: "Srtno",
                table: "MainMsgBizType",
                newName: "SRTNO");

            migrationBuilder.RenameColumn(
                name: "MsgBizTypeName",
                table: "MainMsgBizType",
                newName: "MSG_BIZ_TYPE_NAME");

            migrationBuilder.RenameColumn(
                name: "MsgBizTypeCodg",
                table: "MainMsgBizType",
                newName: "MSG_BIZ_TYPE_CODG");

            migrationBuilder.RenameColumn(
                name: "DefaultFlag",
                table: "MainMsgBizType",
                newName: "DEFAULT_FLAG");

            migrationBuilder.AddColumn<string>(
                name: "BIZ_NO",
                table: "MainMsgSendRec",
                type: "text",
                nullable: true);
        }
    }
}
